package uiLayer;

import modelLayer.Product;
import uiUtil.AbstractCustomTable;

public class ProductTable extends AbstractCustomTable<Product> {
	
	public ProductTable() {
		
		super();
		super.setColNames("Varenr.", "Navn", "Størresle", "Farve", "Pris");
		
	}

	@Override
	public Object getCellValue(int col, Product p) {
		
		Object res = null;
		switch (col) {
			case 0:
				res = p.getProductID();
				break;
			case 1:
				res = p.getName();
				break;
			case 2:
				res = p.getSize();
				break;
			case 3:
				res = p.getColour();
				break;
			case 4:
				res = p.getSalesPrice();
				break;
		}
		return res;
		
	}

}
